Skip to main content

Get List Of Items

AutomatR.OneDriveApp.Activities.GetListOfItems

The "Get List Of Items" activity in AutomatR is part of the OneDrive activities package, designed to retrieve a list of items using Microsoft OneDrive APIs. This activity facilitates the process of fetching and sorting items from a specified location within OneDrive, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
Sort TypeSelect the order type from the dropdown menu to specify the desired order for fetching the list items from OneDrive. Options include ascending (asc) or descending (desc) order.
Sort BySelect a value from the dropdown menu to specify the sorting criteria for the list of items. Options include sorting by name, created date, or other relevant criteria.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get List Of Items" activity. Integer variables containing the delay duration. Example: 5 seconds i.e. 5.
Output
ResultOutputs the result of the "Get List Of Items" operation, storing the list of items in an IDriveItemChildrenCollectionPage variable. You can use this variable for further activities.

How to Use

  1. Drag and drop the "Get List Of Items" activity onto the workflow.
  2. Configure the properties by specifying the order type and sorting criteria for fetching the list of items.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to retrieve the list of items from the specified location within OneDrive.

Important Notes:

  • Ensure that the activity is placed within a "OneDrive Scope" activity to establish the necessary authentication scope.
  • The "Sort Type" allows you to specify the order type, either ascending (asc) or descending (desc).
  • The "Sort By" parameter enables you to define the sorting criteria for the list of items.

Example:

Consider an example where the "Get List Of Items" activity is used to retrieve a list of items from the root directory of the user's OneDrive, sorted by name in ascending order:

Get List Of Items:
Display Name: "Fetch Root Items"
Sort Type: Ascending
Sort By: Name
Result: listOfItems

In this example, the activity fetches items from the root directory of OneDrive, sorting them by name in ascending order. The result is stored in the IDriveItemChildrenCollectionPage variable "listOfItems" for further use in the workflow.